// dlg.txt

begintalkscript;

variables;

begintalknode 1;
	state = -1;
	nextstate = -1;
	condition = get_sdf(66,1) == 0;
	question = "special";
	text1 = "You enter the plains south of the Zephyr Oasis. Someone was trying to grow crops here when the war started. Now the fields are torn up and neglected. Though it doesn't look like they were producing much food to begin with.";
	text2 = "Now the field has been dotted with lines of energy pylons, to keep rogues away from the gates of the city. The pylons line the road and block the crossroads ahead.";
	text3 = "While the pylons are probably keeping most of the rogues and rebels away, they are not fending off the Unbound. You can sense at least one of those devastating creatures nearby, wandering through the field.";
	text4 = "The pylons are simple constructs. They might not recognize the Unbound as an enemy. It might be a good idea to look for signs of the paths the Unbound hunt.";
	action = SET_SDF 66 1 1;

begintalknode 2;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 3;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "__";

begintalknode 4;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Zephyr Oasis - North";
	text3 = "  Lethia Pass - West";
	text4 = "  Kayar's Spire - Southeast";

begintalknode 5;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "One of the Unbound must have destroyed a caravan, found this box, and brought it back here.";
	text2 = "You open it and look inside. It's still empty.";
	text3 = "The creatures never opened it. There is still a wax seal holding it shut. You break the seal, open it, and find something wrapped in a sheet of leather.";
	text4 = "It is a ring of metal. Like steel, but slightly warm to the touch. It doesn't reflect light well. Illumination seems to fall into it.";
	text5 = "This is puresteel, a very rare and difficult-to-work component of high-quality blades and armor. You put it in your pack.";
	code =
		if (gf(66,3) == 0) {
			sf(66,3,1);
			rs(2);
			set_spec_item(8,1);
			}
			else {
				rs(3); rs(4); rs(5);
				}
	break;

begintalknode 6;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  Pylon Control";

begintalknode 7;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "There is a ratty old ledger here, next to two broken pylons. It contains charts of the pylon placement, though the notation makes them hard to understand. You find a cryptic entry near the end:";
	text2 = "  West A-C - Crossroad Control";
	text3 = "  North A - Crossroad Control";
	text4 = "  North B-C - Side Access";

begintalknode 8;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The sign says:";
	text2 = "  BEWARE! PYLON FIELD IS ACTIVE!";

begintalknode 9;
	state = -1;
	nextstate = -1;
	condition = 1;
	question = "special";
	text1 = "The obelisk says:";
	text2 = "  HALL OF THE ORACLE";

begintalknode 10;
	state = -1;
	nextstate = 10;
	condition = 1;
	question = "Name";
	text1 = "There is an old woman sitting cross-legged by this fire, staring deeply into the smoke. The smell of incense is heavy in the air.";
	text2 = "She seems oddly unconcerned about the rogues outside. Perhaps the runes etched in the floor around her have protective power.";
	text3 = "When you approach, she looks up at you. She nods slowly. _I am Sage Lara. I thought you would come._ She points at the rugs across from her. _Please. Sit. I have been lonely, and I am eager to perform a reading._";
	text5 = "Sage Lara sits cross-legged, staring into the fire in front of her. She studies the delicate curls of smoke, trying to tease meaning out of them.";
	text6 = "_What else do you wish to know? The moment I realized you were coming, I knew you would have questions._";
	action = INTRO;

begintalknode 11;
	state = 10;
	nextstate = 11;
	condition = 1;
	question = "How did you know I was coming?";
	text1 = "She continues to stare into the smoke. _I was told that you were in the Oasis. I saw that you would likely find your way to me._";

begintalknode 12;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "Are you sure you are safe here?";
	text1 = "_Even the Unbound, in their madness, sense that it would be foolish to challenge me here. This hall has a blessing. Inside it, I may not be touched._";

begintalknode 13;
	state = 10;
	nextstate = 12;
	condition = 1;
	question = "You perform readings?";
	text1 = "_I do. I answer questions for those who seek knowledge. I use farsight to obtain knowledge beyond. I provide advice based on those visions._";

begintalknode 14;
	state = 10;
	nextstate = 14;
	condition = 1;
	question = "I would like a reading.";
	text1 = "She is silent. She continues to stare at the fire, not even inspecting you out of the corner of her eye. _I am thinking about you now. What I have heard. What I sense. I am casting my vision._";
	text2 = "She winces slightly. The process is clearly draining.";
	text3 = "_What do you wish to know?_";
	
begintalknode 15;
	state = 10;
	nextstate = -1;
	condition = 1;
	question = "That is all I need to know.";
	text1 = "_Then I wish you safe travels. Please be careful around the pylons._";
	action = END_TALK;
	
begintalknode 16;
	state = 11;
	nextstate = -1;
	condition = 1;
	question = "Was told? In some sort of vision?";
	text1 = "She smiles slightly, but she continues to stare into the fire. _No. There are those who bring me food and supplies out here. They tell me the news of comings and goings._";
	text2 = "_Farsight is difficult and tiring. I do not use it when mundane methods would work._";

begintalknode 17;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "For a fee?";
	text1 = "_Normally. But you, you are significant. I can sense it. For you, I cast my vision out of simple interest._";

begintalknode 18;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Do you advise Sage Taygen?";
	text1 = "_I have. Him and his consort. Though I would never share what I have seen with another. I keep secrets._";
	text2 = "_I also cannot say whether he actually ever takes my advice. Do not hold me responsible for the paths he has taken._";
	
begintalknode 19;
	state = 12;
	nextstate = -1;
	condition = 1;
	question = "Tell me about your gift.";
	text1 = "_Farsight. I think. I concentrate. I focus on what I wish to know. I look into the smoke. Thoughts come to me. I have learned, through experience, that the voices I hear speak more truth than lies._";
	text2 = "_It is difficult. The process frequently gives me a terrible headache. But it is my great gift, so it must be used._";
	
begintalknode 20;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "How will the war end?";
	text1 = "_That is too wide a topic. I am focusing on you._";

begintalknode 21;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "How does the rest of the world see me?";
	text1 = "She says, _In a time of war, your standing with others becomes vitally important. What do I see? What do I see?_";
	text2 = "_You have earned the respect of the Shapers. The rebels will fear and mistrust you. And they are correct to do so._";
	text3 = "_You lean toward service of the Shapers, though your loyalty is not absolute. The rebels are nervous about you._";
	text4 = "_You are balanced on the knife edge, leaning neither toward the rebels nor the Shapers. A dangerous place to be, a place without allies._";
	text5 = "_You lean toward service of the rebels, though your loyalty is not absolute. The Shapers are nervous about you._";
	text6 = "_You have earned the respect of the rebels. The Shapers will fear and mistrust you. And they are correct to do so._";
	code =
		clear_strings();
		as(1);
		if (gf(100,0) >= 109)
			as(2);
			else if (gf(100,0) >= 102)
				as(3);
			else if (gf(100,0) >= 98)
				as(4);
			else if (gf(100,0) >= 91)
				as(5);
			else as(6);
	break;
	
begintalknode 22;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "What faction should I join?";
	text1 = "_I look for matters of fact, not opinion. I could advise, but this issue is too cloudy for me to speak._";

begintalknode 23;
	state = 14;
	nextstate = 15;
	condition = gf(66,5) == 0;
	question = "I want to know who I am.";
	text1 = "She nods. _I thought that was what you would ask. I have heard that your past is a mystery. Now that you are here, I may be able to part the veil and see where you are from._";
	text2 = "_But you may not want to know. Losing the past can be a blessing._";

begintalknode 24;
	state = 14;
	nextstate = -1;
	condition = gf(66,5) > 0;
	question = "I want to know more about who I am.";
	text1 = "_I have told you what I know. You define who you are with your acts now. That is a great gift. Use it._";

begintalknode 25;
	state = 14;
	nextstate = -1;
	condition = 1;
	question = "That is all I need to know.";
	text1 = "_Then I will rest._ The stress disappears from her face. _A relief. I was beginning to tire._";

begintalknode 26;
	state = 15;
	nextstate = 10;
	condition = 1;
	question = "Never mind.";
	text1 = "_That is wise. The past is just that. Gone forever._";
	text2 = "_Now I will rest._ The stress disappears from her face. _A relief. I was beginning to tire._";

begintalknode 27;
	state = 15;
	nextstate = 16;
	condition = 1;
	question = "Tell me who I was.";
	text1 = "She nods and stares deeper into the smoke. _You were ... Once, you were significant. You were a linchpin. You are at the point of significance, where your acts ... They made a difference. They changed the course._";
	text2 = "_I can't see more than that ... It is turbulent. Were you a hero? A villain? I can't ..._ The pain and stress are plainly visible on her face. _Hard to see ..._";
	

begintalknode 28;
	state = 16;
	nextstate = 17;
	condition = 1;
	question = "Keep going.";
	text1 = "Sweat pours down her face. _You were changed. Warped. Changed yourself ... Too much. Warped you. Changed your face, your nature. Took ... Took years for your mind to connect with your body. And ..._";
	text2 = "And she stops. She closes here eyes. _It is too hard to see. The forces are too strong. I am like a moth flittering around a roaring bonfire._";
	action = SET_SDF 66 5 1;
	
begintalknode 29;
	state = 17;
	nextstate = 18;
	condition = 1;
	question = "Is that all?";
	text1 = "For the first time, she turns and looks at you. _I have answered the question. You cannot know who you were. There was another person once. A person who looked vaguely similar to what you look like now. A person who fought, who acted._";
	text2 = "_That person is gone. You remain. Whatever victories were won and crimes were committed no longer matter. All that matters is what you do now._";
	text3 = "_This is a gift. Take it and go forward. It is all I can say._";
	

begintalknode 30;
	state = 18;
	nextstate = 10;
	condition = 1;
	question = "I think that you are a fraud.";
	text1 = "She smiles. _Don't deal with your frustration by insulting me. I do have the gift of farsight. It is faint, but real. When supplicants come to me, I take what few things I see and supplement them with my own wisdom._";
	text2 = "_What I say I saw, I saw. What I told you is the truth. It is your decision how to take what I have learned. I do not envy you._";
	text3 = "_Is there anything else you need to know? After that ordeal, I must rest soon._";

begintalknode 31;
	state = 18;
	nextstate = 10;
	condition = 1;
	question = "I thank you.";
	text2 = "_You are welcome. And remember, what I say I saw, I saw. What I told you is the truth. It is your decision how to take what I have learned. I do not envy you._";
	text3 = "_Is there anything else you need to know? After that ordeal, I must rest soon._";
	
//

begintalknode 35;
	state = -1;
	nextstate = 30;
	condition = 1;
	question = "Name";
	text1 = "There is a man with a large satchel over his shoulder walking down the road toward you. A wide variety of tools hang from his belt. He occasionally stops to look at one of the pylons. Then he nods approvingly and moves on.";
	text2 = "When he sees you, he stops. _Greetings. I am Levi. I maintain the field defenses. You should probably not keep going this way. It is very dangerous. Not just because of the Unbound, either._";


begintalknode 36;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "You created the pylons?";
	text1 = "_I'm no Shaper. I'm no breeder. I just maintain them. They don't explode when ordinary outsider humans get close to them._";
	text2 = "_You ... might have more problems._";

begintalknode 37;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "There are Unbound out there?";
	text1 = "_A few. The creations within the pylons are a sort that detects Shapers and larger rogues. They don't sense Unbound._";
	text2 = "_Probably a good thing. If the Unbound triggered a pylon, it would barely hurt the rogue, and then it would get angry and destroy the pylon. Better this way._";

begintalknode 38;
	state = 30;
	nextstate = -1;
	condition = get_stat(20) < 6;
	question = "How can I pass the pylons?";
	text1 = "You try to convince him to give you more information, but he clearly doesn't trust you. _I wouldn't try it. And I'm not supposed to say more about our defenses. Just turn back. That is your best hope._";

begintalknode 39;
	state = 30;
	nextstate = 31;
	condition = get_stat(20) >= 6;
	question = "How can I pass the pylons?";
	text1 = "You manage to convince him to give you more information. _The pylons are controlled from near here, though you shouldn't try to go there. The Unbound are out, and the pylon network is mostly intact._";

begintalknode 40;
	state = 30;
	nextstate = -1;
	condition = 1;
	question = "That's all I need to know.";
	text1 = "_All right. I just wanted to warn you. The only way to stay safe is to head back. Good luck._ He moves on.";
	action = END_TALK;

begintalknode 41;
	state = 31;
	nextstate = -1;
	condition = 1;
	question = "Mostly intact?";
	text1 = "_A few of the pylons have failed. There are gaps in the network. I'm waiting for materials to fix them. You can tell the broken ones by ... Wait! I shouldn't be telling you this!_";
	text2 = "_I just wanted to warn you. The only way to stay safe is to head back. Good luck._ He moves on.";
	action = END_TALK;
	code =
		award_party_xp(100,25);
	break;

	
//

begintalknode 50;
	state = -1;
	nextstate = 50;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 51;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

	
begintalknode 52;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 53;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 54;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 55;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 56;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 57;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
	
begintalknode 58;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 59;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 60;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 61;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 62;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 63;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

begintalknode 64;
	state = 50;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 70;
	state = -1;
	nextstate = 70;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 71;
	state = 70;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";

//

begintalknode 90;
	state = -1;
	nextstate = 90;
	condition = 1;
	question = "Name";
	text1 = ".";
	text2 = "";
	text5 = ".";
	action = INTRO;

begintalknode 91;
	state = 90;
	nextstate = -1;
	condition = 1;
	question = "";
	text1 = ".";
	text2 = "";
		